package com.cl.it.custom.controller;


import com.cl.it.custom.model.CompanyVo;
import com.cl.it.custom.service.IBizCompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.ModelAndView;

/**
 * <p>
 * 公司配置 前端控制器
 * </p>
 *
 * @author kehui
 * @since 2022-01-17
 */
@Controller
@RequestMapping("/custom/core/company")
public class BizCompanyController {

    @Autowired
    private IBizCompanyService companyService;

    @RequestMapping("/company_detail")
    public ModelAndView companyDetail(String name) {
        ModelAndView mav = new ModelAndView("page/company_detail");
        mav.addObject("name", name);
        CompanyVo companyInfo = companyService.getCompanyInfo(name);
        mav.addObject("companyInfo", companyInfo);
        return mav;
    }
}

